import 'package:flutter/material.dart';
import 'package:get/get.dart';

import '../main.dart';
import '../mc_router.dart';
import 'MMKVTags.dart';

class CommonUtils {
  static void logout() async {

    // 清除缓存信息
    // prefs.clear();
    prefs.setString(MMKVTags.TOKEN, "");
    prefs.setString(MMKVTags.USERID, "");
    prefs.setBool(MMKVTags.LOGIN_TAG, false);
    // PHONE_NUMBER
    Get.offAllNamed(MCRouter.initPage);
  }

  /*static void lookupPhotos(List<ImageProvider> list, int index) {
    Get.toNamed(MCRouter.lookupPhotoPage, arguments: {"photos": list, "index": index});
  }*/
}